package br.com.sysmagnus.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Entity implementation class for Entity: Reserva
 *
 */
@Entity(name="Reserva")
@Table(name="reserva")
@SequenceGenerator(name="seq_reserva",sequenceName="seq_reserva",allocationSize=1,initialValue=1)
public class ReservaEntity implements Serializable {

	@ManyToOne(optional=false)
	private HospedeEntity hospede;
	
	public HospedeEntity getHospedeEntity(){
		return hospede;
	}
	
	public void setHospedeEntity(HospedeEntity hospede){
		this.hospede = hospede;
	}
	
	private static final long serialVersionUID = 1L;
	
	@Id 
	@GeneratedValue(generator="seq_reserva",strategy=GenerationType.SEQUENCE)
	private Long id;
	
	@Temporal(TemporalType.TIMESTAMP)
	private Date checkIn;
	
	@Temporal(TemporalType.TIMESTAMP)
	private Date checkOut;
	
	private int adultos;
	
	private int criancas;
	

	public enum Status{RASCUNHO, ATIVO};
	
	@Enumerated(EnumType.STRING)
	private Status status;
	
	
	
	public HospedeEntity getHospede() {
		return hospede;
	}

	public void setHospede(HospedeEntity hospede) {
		this.hospede = hospede;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getCheckIn() {
		return checkIn;
	}

	public void setCheckIn(Date checkIn) {
		this.checkIn = checkIn;
	}

	public Date getCheckOut() {
		return checkOut;
	}

	public void setCheckOut(Date checkOut) {
		this.checkOut = checkOut;
	}

	public int getAdultos() {
		return adultos;
	}

	public void setAdultos(int adultos) {
		this.adultos = adultos;
	}

	public int getCriancas() {
		return criancas;
	}

	public void setCriancas(int criancas) {
		this.criancas = criancas;
	}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

	public ReservaEntity() {
		super();
	}
   
}
